//Horse class has an instance variable of type Halter
//so you can say that "Horse HAS-A Halter" vi da khai bao:
//private Halter myHalter;
//p68/457
//IS-A & HAS-A relationships and encapsulation are just tip of iceberg when it 
//comes to OO design.
//Many books and graduate theses have been dedicated to this topic. The reason for
//the emphasis on proper design is simple: MONEY
package session2.hasa;

public class Horse extends Animal {

	public Horse() {
	}

	@SuppressWarnings("unused")
	// Horse class has Halter behavior
	private Halter myHalter;// HAS-A

	public void tie(LeadRope rope) {
		myHalter.tie(rope);// Delegate tie behavior to the halter object
	}

}


//24/03